﻿using PMS.Web.Models.SystemModules;
using System.Collections.Generic;

namespace PMS.Web.Factories.SystemModules
{
    public interface ISystemModuleModleFactory
    {
        /// <summary>
        /// WebApi Call For SystemMenu Preparing
        /// </summary>
        /// <param name="storeId"></param>
        /// <param name="customerId"></param>
        /// <param name="loadAll">
        ///    False : 默认false,按用户所有角色权限加载系统菜单 用于后台主页菜单数据加载
        ///    True : 当前Store所有菜单数据加载，用于系统模块编辑页加载父级菜单
        /// </param>
        /// <returns></returns>
        IList<SystemMenuModel> PrepareSystemMenuModels(int storeId, int customerId, bool loadAll = false);

        /// <summary>
        /// Get All SystemModules For TreeTable List
        /// </summary>
        /// <param name="storeId"></param>
        /// <returns></returns>
        IList<SystemModuleModel> PrepareAllSystemModuleModels(int storeId);

        /// <summary>
        /// Get A SystemModule Model
        /// </summary>
        /// <param name="moduleId"></param>
        /// <returns></returns>
        SystemModuleModel GetSystemModuleModel(int moduleId);

        /// <summary>
        /// Get A SystemModuleModel from db by EntityId, return a new Model when EntityNotFound
        /// </summary>
        /// <param name="moduleId"></param>
        /// <returns></returns>
        SystemModuleModel PrepareSystemModuleModelForEdit(int moduleId);

        /// <summary>
        /// Get all modulebutton models
        /// </summary>
        /// <returns></returns>
        IList<ModuleButtonModel> PrepareAllModuleButtons();
    }
}
